/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ipo.mm.web.formbeans;

import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.ipo.mm.web.util.ConstantManager;

/**
 *
 * @author makcro
 */
public class InstitutionSearchBean extends org.apache.struts.validator.ValidatorForm {

    private String nameFilter;
    private String nameOperator;

    private String addressFilter;
    private String addressOperator;

    private String emailFilter;
    private String emailOperator;


    private String telephoneFilter;
    private String telephoneOperator;

    private String faxFilter;
    private String faxOperator;


    private String representativeFilter;
    private String representativeOperator;

    private String[] typeFilter;
    private String[] regionFilter;
    private String[] familyFilter;
    private String[] cityFilter;

    private String orderBy;

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public String getAddressFilter() {
        return addressFilter;
    }

    public String[] getCityFilter() {
        return cityFilter;
    }

    public void setCityFilter(String[] cityFilter) {
        this.cityFilter = cityFilter;
    }

    
    public void setAddressFilter(String addressFilter) {
        try {
            this.addressFilter = new String(addressFilter.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(InstitutionSearchBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public String getAddressOperator() {
        return addressOperator;
    }

    public void setAddressOperator(String addressOperator) {
        this.addressOperator = addressOperator;
    }

    public String getEmailFilter() {
        return emailFilter;
    }

    public void setEmailFilter(String emailFilter) {
        this.emailFilter = emailFilter;
    }

    public String getEmailOperator() {
        return emailOperator;
    }

    public void setEmailOperator(String emailOperator) {
        this.emailOperator = emailOperator;
    }

    public String[] getFamilyFilter() {
        return familyFilter;
    }

    public void setFamilyFilter(String[] familyFilter) {
        this.familyFilter = familyFilter;
    }

    public String getFaxFilter() {
        return faxFilter;
    }

    public void setFaxFilter(String faxFilter) {
        this.faxFilter = faxFilter;
    }

    public String getFaxOperator() {
        return faxOperator;
    }

    public void setFaxOperator(String faxOperator) {
        this.faxOperator = faxOperator;
    }

    public String getNameFilter() {
        return nameFilter;
    }

    public void setNameFilter(String nameFilter) {
        try {
            this.nameFilter = new String(nameFilter.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(InstitutionSearchBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public String getNameOperator() {
        return nameOperator;
    }

    public void setNameOperator(String nameOperator) {
        this.nameOperator = nameOperator;
    }

    public String[] getRegionFilter() {
        return regionFilter;
    }

    public void setRegionFilter(String[] regionFilter) {
        this.regionFilter = regionFilter;
    }

    public String getRepresentativeFilter() {
        return representativeFilter;
    }

    public void setRepresentativeFilter(String representativeFilter) {
        try {
            this.representativeFilter = new String(representativeFilter.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(InstitutionSearchBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public String getRepresentativeOperator() {
        return representativeOperator;
    }

    public void setRepresentativeOperator(String representativeOperator) {
        this.representativeOperator = representativeOperator;
    }

    public String getTelephoneFilter() {
        return telephoneFilter;
    }

    public void setTelephoneFilter(String telephoneFilter) {
        this.telephoneFilter = telephoneFilter;
    }

    public String getTelephoneOperator() {
        return telephoneOperator;
    }

    public void setTelephoneOperator(String telephoneOperator) {
        this.telephoneOperator = telephoneOperator;
    }

    public String[] getTypeFilter() {
        return typeFilter;
    }

    public void setTypeFilter(String[] typeFilter) {
        this.typeFilter = typeFilter;
    }

















    
    /**
     *
     */
    public InstitutionSearchBean() {
        super();
        // TODO Auto-generated constructor stub
    }

    /**
     * This is the action called from the Struts framework.
     * @param mapping The ActionMapping used to select this instance.
     * @param request The HTTP Request we are processing.
     * @return
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = super.validate(mapping, request);
        
        
        return errors;
    }
}
